<template>
	<view class="bloodPressureDay">
		<view class="bloodPressure-echart">
			<view>
				<text>血压<text class="tap">{{data==null?"-0":data.highter}}/{{data==null?"-0":data.lower}}</text>mmHg</text>
				<text>脉搏<text class="tap">{{data==null?"-0":data.pulse}}</text>次/分</text>
				<text class="small">{{time}}</text>
			</view>
			<view class="echart">
				<bloodPressureLineVue></bloodPressureLineVue>
			</view>
		</view>
		<view class="bloodPressure-target">
			<view>
				<image src="/static/index/pie.png"></image>
				<text>血压分布</text>
			</view>
			<view>
				<bloodPressureColumnVue></bloodPressureColumnVue>
			</view>
		</view>
		</view>
</template>

<script setup>
import { reactive, ref } from 'vue';
import bloodPressureLineVue from '../../../ucharts/bloodPressure/bloodPressureLine.vue';
import bloodPressureColumnVue from '../../../ucharts/bloodPressure/bloodPressureColumn.vue';
//后端数据
	let data=reactive({
		highter:85,
		lower:80,
		pulse:60
	})
//时间
const now = new Date();
const hours = now.getHours();
const minutes = now.getMinutes();
const time=ref(hours+":"+minutes);

</script>

<style scoped>
	.bloodPressureDay {
		padding: 0rpx 10rpx 0rpx 10rpx;
		height: 100vh;
		padding-top: 220rpx;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
	}
	text {
		margin: 8rpx 0rpx 0rpx 20rpx;
	}
	
	.bloodPressureDay>view {
		height:70%;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		margin: 20rpx 20rpx;
		padding-top: 20rpx;
		box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
		border-radius: 25rpx;
	}
	.bloodPressureDay>view:nth-child(2){
		height:30%;
	}
	image {
		margin-left: 20rpx;
		width: 50rpx;
		height: 50rpx;
	}
	/* echarts图部分 */
	.bloodPressure-echart>view:nth-child(1){
		height:30%;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		
	}
	/* echart图 */
	.echart{
		width:100%;
		height:60%;
	}
	.tap {
		font-size: 44rpx;
	}
	
	/* 指标部分 */
	.bloodPressure-target>view:nth-child(1){
		width: 100%;
		height: 30%;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: flex-start;
		border-bottom: 2rpx solid #cccccc;
	}
	.bloodPressure-target>view:nth-child(2){
		width: 100%;
		height: 70%;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
	}
	.bloodPressure-text{
		margin-left:45rpx;
	}
	/* 灰色时间文字 */
	.small{
		font-size:24rpx;
		color: #838383;
	}
</style>